package com.sunyzc.ebaotech.simulator.soap;

import java.text.ParseException;

public interface ISOAPProcessor {
	public final static String SERVER_HOST_PRE_PROD = "172.25.12.29:7001";
	public final static String SERVER_HOST_SHVM00310 = "172.30.1.205:8080";
	public final static String SERVER_HOST_LS4_DEV = "172.25.13.117";
	public final static String SERVER_HOST_LS4_TST = "172.25.13.116";

	public String getWSDLURL(String serverHost);

	/** 设置服务器时间相对于本地时间的日期偏移量 */
	public void setDateOffSet(int dateOffset);

	/** 日期格式统一为yyyyMMdd，然后再转换成各个银行报文中的日期格式 */
	public void setCurrentDate(String currentDateStr) throws ParseException;

	/** 根据形如RP1002-PolicyNo的transXmlMapKey从历史报文中获取相应节点的值 */
	public String getElementValue(String transXmlMapKey);

	/** 根据形如RP1002-PolicyNo的transXmlMapKey从历史报文中获取相应节点的值，如果没有找到节点则返回defaultValue默认值 */
	public String getElementValue(String transXmlMapKey, String defaultValue);

	/** 根据requestTransType获取请求报文模板 */
	public String generateRequestBodyTemplateStr(String requestTransType, boolean needRemoveComments) throws Exception;

	/** 根据请求报文模板，静态替换流水号、交易日期、交易时间等字段，然后正则替换保单号、保费等字段 */
	public String generateRequestBodyStr(String requestTransType, String requestBodyTemplateStr, boolean needRemoveComments) throws Exception;

	/** 调用WebService */
	public String invokeSOAPServer(String serverHost, String requestTransType, String requestBodyContentStr) throws Exception;

	/** 获取调用WebService的参数对象数据 */
	public Object[] getRequestParams(String requestTransType, String requestBodyContentStr);
}
